package Experiment3;

public class Card {
    private String name;
    public Card(){
        name = "";
    }
    public Card(String n){
        this.name = n;
    }
    public String getName(){
        return name;
    }
    public boolean isExpired(){
        return false;
    }
    public String format(){
        return "Card holder: "+this.name;
    }
    @Override
    public String toString(){
        return getClass()+"[name="+this.name+"]\n";
    }
    @Override
    public boolean equals(Object o){
        if(o instanceof Card)
            if(((Card)o).name==this.name)
                return true;
        return false;
    }
}
